package com.yz.newspaper.controller;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yz.newspaper.pojo.po.UnitSign;
import com.yz.newspaper.pojo.result.Result;
import com.yz.newspaper.service.IUnitSignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 *
 * 联合署名表 前端控制器
 *
 *
 * @author author
 * @since 2024-04-21
 */
@RestController
@RequestMapping("/unit-sign")
public class UnitSignController {

    @Autowired
    private IUnitSignService unitSignService;

    @GetMapping
    public Result<Map<Integer, List<UnitSign>>> getAll() {

        Map<Integer, List<UnitSign>> maps = unitSignService.getAll();

        return Result.success(maps);
    }

}
